<?php

class Ads_Form_Uploadexample extends Zend_Form {

    public function init() {
        $this->setMethod('post')                
                ->setAttrib('enctype', 'multipart/form-data');

        $photo = new Zend_Form_Element_File('photo');        
        $photo->setLabel('Images:')
//                ->setMultiFile(3)
                ->addValidator('IsImage')
//                ->setDestination('/home/savan/Pictures/uploads')
                ->setDestination('/var/www/zf1/public/uploads')
                ->addValidator('Size', false, 204800)
                ->addValidator('Extension', false, 'jpg,png,gif')
                ->setAttrib('multiple','multiple')
                ->setIsArray(true)
                ->setValueDisabled(true);
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Upload')
                ->setOptions(array('class'=>'btn btn-success'));
        
        $this->addElements(array($photo,$submit));
        
    }

}

